package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.tomcat.jni.User;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.ChannelGroupAddDTO;
import org.jsola.hr.dto.ChannelGroupUpdateDTO;
import org.jsola.hr.query.ChannelGroupQuery;
import org.jsola.hr.vo.ChannelGroupListVO;
import org.jsola.hr.vo.ChannelGroupVO;
import org.jsola.hr.vo.ChannelGroupsVO;
import org.jsola.hr.vo.HrUserVO;
import org.jsola.salary.query.ChannelFeeSettlementQuery;
import org.jsola.salary.vo.ChannelFeeSettlementVO;
import org.jsola.user.core.TokenUser;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * 渠道分组表
 *
 * @author zhr
 */
@Api(tags = "hr-渠道分组表")
public interface IChannelGroupControllerAPI {

    /**
     * 渠道劳务费结算导出(新)
     * @param channelFeeSettlementQuery 查询参数
     * @return page
     */
    @ApiOperation(value="渠道劳务费结算导出(新)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelFeeSettlementQuery", dataType = "ChannelFeeSettlementQuery", value = "渠道劳务费结算查询参数", paramType = "body")
    })
    ResponseEntity<Resource> channelFeeSettlementExport(ChannelFeeSettlementQuery channelFeeSettlementQuery);

    /**
     * 查询渠道劳务费结算(新)
     * @param channelFeeSettlementQuery 查询参数
     * @return page
     */
    @ApiOperation(value="查询渠道劳务费结算(新)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelFeeSettlementQuery", dataType = "ChannelFeeSettlementQuery", value = "渠道劳务费结算查询参数", paramType = "body")
    })
    Result<Page<ChannelFeeSettlementVO>> getChannelFeeSettlement(ChannelFeeSettlementQuery channelFeeSettlementQuery);

    /**
     * 查询渠道分组表
     * @param channelGroupQuery 渠道分组表查询参数
     * @return page
     */
    @ApiOperation(value="查询分组中没分配的所有用户")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupQuery", dataType = "ChannelGroupQuery", value = "渠道分组表查询参数", paramType = "query")
    })
    Result<Page<HrUserVO>> getNotDistributionUser(ChannelGroupQuery channelGroupQuery);

    /**
     * 查询渠道分组表
     * @param channelGroupQuery 渠道分组表查询参数
     * @return page
     */
    @ApiOperation(value="查询渠道分组表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupQuery", dataType = "ChannelGroupQuery", value = "渠道分组表查询参数", paramType = "query")
    })
    Result<ChannelGroupsVO> getMyChannelGroup(ChannelGroupQuery channelGroupQuery);

    /**
     * 新增渠道分组表
     * @param channelGroupAddDTO 渠道分组表新增实体
     * @return 渠道分组表展示对象
     */
    @ApiOperation(value = "新增渠道分组表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupAddDTO", dataType = "ChannelGroupAddDTO", value = "新增渠道分组表", paramType = "body")
    })
    Result<ChannelGroupVO> save(ChannelGroupAddDTO channelGroupAddDTO);


    /**
     * 修改渠道分组表
     * @param channelGroupUpdateDTO 渠道分组表
     * @return 更新数量
     */
    @ApiOperation(value = "修改渠道分组表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupUpdateDTO", dataType = "ChannelGroupUpdateDTO", value = "修改渠道分组表", paramType = "body")
    })
    Result<Integer> update(ChannelGroupUpdateDTO channelGroupUpdateDTO);




    /**
     * 删除单个渠道分组表，彻底删除
     * @param channelGroupId 渠道分组表id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个渠道分组表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupId", dataType = "String", value = "渠道分组表id", paramType = "path")
    })
    Result<Integer> delete(String channelGroupId);


    /**
     * 批量删除渠道分组表，彻底删除
     * @param channelGroupIds 渠道分组表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除渠道分组表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupIds", dataType = "String[]", value = "渠道分组表id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] channelGroupIds);


    /**
     * 根据渠道分组表id查询渠道分组表详情
     * @param channelGroupId 渠道分组表id
     * @return 渠道分组表详情
     */
    @ApiOperation(value="根据渠道分组表id查询渠道分组表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupId", dataType = "String", value = "渠道分组表id", paramType = "path")
    })
    Result<ChannelGroupVO> findById(String channelGroupId);


    /**
     * 查询渠道分组表
     * @param channelGroupQuery 渠道分组表查询参数
     * @return page
     */
    @ApiOperation(value="查询渠道分组表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupQuery", dataType = "ChannelGroupQuery", value = "渠道分组表查询参数", paramType = "query")
    })
    Result<List<ChannelGroupListVO>> listAll(ChannelGroupQuery channelGroupQuery);


     /**
     * 分页查询渠道分组表
     * @param channelGroupQuery 渠道分组表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询渠道分组表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelGroupQuery", dataType = "ChannelGroupQuery", value = "渠道分组表查询参数", paramType = "query")
    })
    Result<Page<ChannelGroupListVO>> page(ChannelGroupQuery channelGroupQuery);


}

